package main

import "fmt"

func main() {
	nextNumber := getClosure();
	for i := 1; i<= 10; i++ {
		fmt.Println("num==", nextNumber())
	}
}

func getClosure() func() int  {
	i := 0
	return func () int {
		i += 1 
		return i
	}
}